﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Titles.aspx.cs" Inherits="Titles_Titles" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <p>
        Title List</p>
    <p>
        <asp:DataList ID="DataList1" runat="server" CellPadding="4" 
            DataSourceID="SqlDataSource2" ForeColor="#333333">
            <AlternatingItemStyle BackColor="White" />
            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
            <ItemStyle BackColor="#FFFBD6" ForeColor="#333333" />
            <ItemTemplate>
                Title:
                <asp:Label ID="titleLabel" runat="server" Text='<%# Eval("title") %>' Font-Bold="true" />
                <br />
                Price:
                <asp:Label ID="priceLabel" runat="server" Text='<%# Eval("price") %>' />
                <br />
                Author:
                <asp:Label ID="au_fullnameLabel" runat="server" 
                    Text='<%# Eval("au_fullname") %>' />
                <br />
                Notes:
                <asp:Label ID="notesLabel" runat="server" Text='<%# Eval("notes") %>' />
                <br />
                Date:
                <asp:Label ID="pubdateLabel" runat="server" Text='<%# Eval("pubdate") %>' />
                <br />
                Publisher:
                <asp:Label ID="pub_nameLabel" runat="server" Text='<%# Eval("pub_name") %>' />
                <br />
<br />
            </ItemTemplate>
            <SelectedItemStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
        </asp:DataList>
    </p>
    <p>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:brianbookstoreConnectionString1 %>" 
            SelectCommand="SELECT titles.title, titles.price, authors.au_fname + ' ' + authors.au_lname AS au_fullname, titles.notes, titles.pubdate, publishers.pub_name FROM authors INNER JOIN titles ON authors.au_id = titles.au_id INNER JOIN publishers ON titles.pub_id = publishers.pub_id">
        </asp:SqlDataSource>
    </p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
</asp:Content>

